package com.exchange.used.config.query;

import java.util.LinkedHashMap;
import java.util.List;

public class Condition {
    private String firstTable;
    private List<Where> wheres;//查询条件
    private LinkedHashMap<String, String> relations;//查询条件的连接关系 ( table1.field1 <--> table2.field2 )
    private Order order;//排序
    private Integer page;//分页页数
    private Integer limit;//分页大小

    public String getFirstTable() {
        return firstTable;
    }

    public void setFirstTable(String firstTable) {
        this.firstTable = firstTable;
    }

    public List<Where> getWheres() {
        return wheres;
    }

    public void setWheres(List<Where> wheres) {
        this.wheres = wheres;
    }

    public LinkedHashMap<String, String> getRelations() {
        return relations;
    }

    public void setRelations(LinkedHashMap<String, String> relations) {
        this.relations = relations;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }


    public Condition(String firstTable, List<Where> wheres, LinkedHashMap<String, String> relations, Order order) {
        this.firstTable = firstTable;
        this.wheres = wheres;
        this.relations = relations;
        this.order = order;
    }

    public Condition() {
    }
}

